package com.dxy.yzs.marathon.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dxy.yzs.marathon.domain.Topic;
import com.dxy.yzs.marathon.service.TopicService;
import com.dxy.yzs.marathon.mapper.TopicMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class TopicServiceImpl extends ServiceImpl<TopicMapper, Topic>
    implements TopicService{

    @Override
    public List<Topic> hotTop5() {
        return lambdaQuery().last(" limit 5 ").orderByDesc(Topic::getId).list();
    }
}




